<?php
use think\facade\Db;
 
class searchContacts{
    public function TODO($frame,$fd){
        $param = (array)json_decode($frame->data); 
 
        $isEmpty = Db::name('user')->field('username,uuid,fd')->where("username",$param['toUsername'])->find(); 
        if($isEmpty && ($param['toUsername'] != $param['usernameTo'] )){ 
             $return = [
                'status'=>1,
                'msg'=>'查到该用户',
                'data'=>$isEmpty, 
                'act'=>'searchContacts',
                'fd'=>$fd,
            ];
        }else{
            $return = [
                'status'=>0,
                'msg'=>'该账户不存在',
                'data'=>'', 
                ];
        }
        return $return;
    }
}